package com.itheima.service.impl.store;


import com.itheima.mapper.store.PieAgeMapper;
import com.itheima.service.store.PieAgeService;
import com.itheima.utils.MapperUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;
import java.util.Map;

public class PieAgeServiceImpl implements PieAgeService {
    @Override
    public List<Map<String, Object>> findSexCount() {
        SqlSession session= MapperUtil.getSession();
        PieAgeMapper mapper = session.getMapper(PieAgeMapper.class);
        List<Map<String, Object>> list=mapper.findAgeCount();
        MapperUtil.close(session);
        return list;
    }
}
